package com.weilai.dao;

import com.weilai.domain.Replies;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface RepliesDao {
    //按id查询
    @Select("select * from replies where id=#{id}")
    Replies selectById(int id);
    //按userId查询
    @Select("select * from replies where user_id=#{id}")
    List<Replies> selectByUserId(int id);
    //查询审核中的回答
    @Select("select * from replies where status='审核中'")
    List<Replies> repliesUnderChecking();

}
